package org.xc.studentssystem.mapper;


import org.apache.ibatis.annotations.*;
import org.xc.studentssystem.pojo.User;

import java.util.List;

@Mapper
public interface UserManageSystemMapper {

    @Select("select id,username,nick,email,phone from users")
    List<User> getAllUser();

    @Delete("delete from users where username=#{username}")
    void deleteUser(User user);

    @Select("select * from users where username=#{username}")
    User selectform(User user);

    @Update("update users set username=#{username},nick=#{nick},email=#{email},phone=#{phone} where id = #{id}")
    void updateUser(User user);

    @Select("select * from users where username=#{username}")
    User getUserByName(User user);
}
